/*
检测修为配置
*/
window._XWT = {

    _JOB:{
        'bl':'射手',
        'ds':'盗贼',
        'bq':'首领',
        'zhous':'方士',
        'jg':'方士',
        'yus':'方士',
        'sq':'方士',
    },
    _RACE:{
        'ny':{'ren':1},
        'bf':{'ren':1},
        'yaos':{'yao':1},
        'hs':{'yao':1},
        'xs':{'xian':1},
        'fx':{'xian':1},

        'jg':{'ren':1},
        'yus':{'yao':1},
        'sq':{'xian':1},

        'fj':{'xian':1,'ren':1},
        'kh':{'yao':1,'ren':1},
        'zs':{'xian':1,'yao':1},
    },
    _CHAPTER:{

    },


    testAll:function(){

        var skillmap = {};

        for(var skillbd in _SKILLBD){

            var conf = _SKILLBD[skillbd];
            var xw = conf.xw;
            skillmap[skillbd] = xw;
        }

        //console.log(skillmap);
        var msg = "";
        var npcnmb = 0;

        for(var npcname in _NPC){

            var npcconf = _NPC[npcname];

            var tmpmsg = npcname;

            for(var xw in npcconf.npcxw){

                if(_XWT._JOB[xw]&&npcconf.job!=_XWT._JOB[xw]){
                    tmpmsg+=(' 职业修为不匹配'+npcconf.job+_XW[xw].label);
                }

                if(_XWT._RACE[xw]&&!_XWT._RACE[xw][npcconf.race]){
                    tmpmsg+=(' 种族修为不匹配'+_RACE[npcconf.race].name+_XW[xw].label);
                }
            }

            for(var skill in npcconf.skill){
                if(skillmap[skill]){
                    for(var xw in skillmap[skill]){
                        if(_XWT._JOB[xw]&&npcconf.job!=_XWT._JOB[xw]){
                            tmpmsg+=(' 职业技能不匹配'+npcconf.job+skill);
                        }

                        if(_XWT._RACE[xw]&&!_XWT._RACE[xw][npcconf.race]){
                            tmpmsg+=(' 种族技能不匹配'+_RACE[npcconf.race].name+skill);
                        }
                    }
                }
            }

            if(tmpmsg!=npcname){
                msg+=tmpmsg+"\n";
                npcnmb++;
            }

        }

        console.log(msg);
        console.log('需要调整人数:',npcnmb)
    }

}